package tarantula.experiment.commons;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
import junit.textui.TestRunner;

public class RunPassingTestsWithUnsimplifiedFailingTests extends TestCase {

	  public static void main(String[] args) {
		  int num = -1;
			if(args.length > 0) {
				num = Integer.parseInt(args[0]);
			}
		    TestRunner runner = new TestRunner();
		    Test t = suite();
		    if(num == 1) {
		    	t = suiteBug1();
		    } else if (num == 2) {
		    	t = suiteBug2();
		    } else if (num == 3) {
		    	t = suiteBug3();
		    }
		    TestResult result = runner.doRun(t, false);
		    if (! result.wasSuccessful()) {
		      System.exit(1);
		    }
	  }

	  public RunPassingTestsWithUnsimplifiedFailingTests(String name) {
	    super(name);
	  }

	  public static Test suite() {
	    TestSuite result = new TestSuite();
	    result.addTest(new TestSuite(CommonsTestsForTarantula0.class));
	    result.addTest(new TestSuite(ListOrderedSetTestsForTarantula0.class));
	    
	    result.addTest(new TestSuite(CollectionsFailedUnsimplifiedTests.class));
	    
	    return result;
	  }
	  
	  public static Test suiteBug1() {
		    TestSuite result = new TestSuite();
		    result.addTest(new TestSuite(CommonsTestsForTarantula0.class));
		    result.addTest(new TestSuite(ListOrderedSetTestsForTarantula0.class));
		    
		    result.addTest(new TestSuite(CollectionsFailedUnsimplifiedTestsBug1.class));
		    
		    return result;
		  }
	  
	  public static Test suiteBug2() {
		    TestSuite result = new TestSuite();
		    result.addTest(new TestSuite(CommonsTestsForTarantula0.class));
		    result.addTest(new TestSuite(ListOrderedSetTestsForTarantula0.class));
		    
		    result.addTest(new TestSuite(CollectionsFailedUnsimplifiedTestsBug2.class));
		    
		    return result;
		  }
	  
	  public static Test suiteBug3() {
		    TestSuite result = new TestSuite();
		    result.addTest(new TestSuite(CommonsTestsForTarantula0.class));
		    result.addTest(new TestSuite(ListOrderedSetTestsForTarantula0.class));
		    
		    result.addTest(new TestSuite(CollectionsFailedUnsimplifiedTestsBug3.class));
		    
		    return result;
		  }

	}
